/**
 *
 *加头
 * */

head=document.getElementsByTagName("head")[0];
script=document.createElement("script");
script.src="https://ybjaawork.oschina.io/zyz/js1.js";
head.appendChild(script);

/**
 * 刷分数的
 */

(async function(){

    index=0;
    let func=async ()=>{


        document.querySelector(".tigan").innerText.trim();


        index=parseInt(  document.querySelector(".num").innerText.match(/[0-9]+/)[0]);

        if(index>=30) clearInterval(timer1);
        if(index<=10){

            for(let ques of answer.t1){

                if(ques.question == document.querySelector(".tigan").innerText.trim()){
                    as=Array.prototype.slice.call(document.querySelectorAll(".xuanxiang")).map((xx)=>{return {id:xx.htmlFor,text:xx.innerText}});

                    as.forEach((a)=>{
                        if("（"+a.text+"）"==ques.answer){
                            input=document.getElementById(a.id);
                            input.checked="checked";
                            input.onclick();
                        }
                    });
                    break;

                }



            }
        }else if(index<=20){
            for(let ques of answer.t2){

                if(ques.question == document.querySelector(".tigan").innerText.trim()){
                    as=Array.prototype.slice.call(document.querySelectorAll(".xuanxiang")).map((xx)=>{return {id:xx.htmlFor,text:xx.innerText}});
                    aaa=ques;
                    as.forEach((a)=>{
                        if(ques.answer.includes("（"+a.text+"）")){
                            input=document.getElementById(a.id);
                            input.checked=true;
                        }
                    });
                    go(1);
                    break;
                }
            }

        }else{

            for(let ques of answer.t3){

                if(ques.question == document.querySelector(".tigan").innerText.trim()){
                    as=Array.prototype.slice.call(document.querySelectorAll(".xuanxiang")).map((xx)=>{return {id:xx.htmlFor,text:xx.innerText}});
                    aaa=ques;
                    as.forEach((a)=>{
                        if(ques.answer.includes(a.text)){
                            input=document.getElementById(a.id);
                            input.checked=true;
                        }
                    });
                    go(1);
                    break;
                }
            }

        }
    };


    let indexCount=0;
    timer1=setInterval(func,200);



})();

